package com.zhongke.cotrun.model.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;
import com.zhongke.cotrun.model.validator.UserValidator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * 创新活动表
 *
 * @author lee
 * @email wawzj512541@gmail.com
 * @date 2019-11-15 14:59:00
 */
@Data
@ApiModel(value = "InnovationActivitiesEntity", description = "创新活动Model")
public class InnovationActivitiesEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ApiModelProperty(value = "搜索关键字,修改时必填",example = "1")
    @NotNull(message = "主键id不能为空", groups = {UserValidator.UpDate.class})
    private Integer id;
    /**
     * 活动主题
     */
    @ApiModelProperty(value = "活动主题",example = "测试主题",required = true)
    @NotNull(message = "活动主题不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String activitiesTopic;
    /**
     * 活动内容500字以内
     */
    @ApiModelProperty(value = "活动内容",example = "测试内容",required = true)
    @NotNull(message = "活动内容不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String activitiesContent;
    /**
     * 活动类型
     */
    @ApiModelProperty(value = "活动类型,通过接口获取",example = "1001003",required = true)
    @NotNull(message = "活动类型不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer activitiesType;
    /**
     * 活动模式 0:线上 1线下
     */
    @ApiModelProperty(value = "活动模式 0:线上 1线下",example = "0",required = true)
//    @NotNull(message = "活动模式不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer activitiesMode;
    /**
     * 活动行业
     */
    @ApiModelProperty(value = "活动行业,通过接口获取,多个行业用英文逗号分隔",example = "1002011,1002012",required = true)
//    @NotNull(message = "活动行业不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String activitiesIndustry;
    /**
     * 主办单位
     */
    @ApiModelProperty(value = "主办单位",example = "主办1,主办2",required = true)
    @NotNull(message = "主办单位不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String organizers;
    /**
     * 承办单位
     */
//    @NotNull(message = "承办单位不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String contractors;
    /**
     * 协办单位
     */
    @ApiModelProperty(value = "协办单位",example = "协办1,协办2")
    private String coOrganizers;
    /**
     * 活动开始时间
     */
    @ApiModelProperty(value = "活动开始时间,格式yyyy/MM/dd HH:mm",example = "2020/03/24 17:00",required = true)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8" )
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm")
    @NotNull(message = "活动开始时间不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Date startTime;
    /**
     * 活动结束时间
     */
    @ApiModelProperty(value = "活动结束时间,格式yyyy/MM/dd HH:mm",example = "2020/03/24 17:00",required = true)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8" )
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm")
    @NotNull(message = "活动结束时间不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Date endTime;
    /**
     * 省份
     */
    @ApiModelProperty(value = "省份id",example = "452",required = true)
    @NotNull(message = "省份不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer provinceId;
    /**
     * 城市
     */
    @ApiModelProperty(value = "城市id",example = "41",required = true)
    @NotNull(message = "城市不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer cityId;
    /**
     * 区县
     */
    @ApiModelProperty(value = "区县id",example = "452",required = true)
    @NotNull(message = "区县不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private Integer districtId;
    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细地址",example = "xx街道xx号xx幢xx层xxx",required = true)
    @NotNull(message = "详细地址不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String address;
    /**
     * 活动图片地址(多个图片用","隔开)
     */
    @ApiModelProperty(value = "活动图片地址(多个图片用\",\"隔开)",example = "http://1.jpg,http://2.jpg")
    @NotNull(message = "活动图片地址不能为空", groups = {UserValidator.UpDate.class, UserValidator.InSet.class})
    private String imgAddrs;
    /**
     * 状态:1进行中;2已结束
     */
    @ApiModelProperty(value = "状态:1进行中;2已结束",example = "1")
    private String status;
    private Integer statusTag;
    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间,格式yyyy-MM-dd HH:mm:ss",example = "2020-03-24 17:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间,格式yyyy-MM-dd HH:mm:ss",example = "2020-03-24 17:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8" )
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;
    /**
     * 0未删除;1删除
     */
    @ApiModelProperty(value = "删除标记 0未删除;1删除",example = "0")
    private Integer delFlag;
    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人",example = "张三",required = true)
    @NotNull(message = "联系人不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    private String contact;
    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话",example = "+86 010-12345678",required = true)
    @NotNull(message = "联系电话不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    private String phoneNumber;
    /**
     * 报名截止时间
     */
    @ApiModelProperty(value = "报名截止时间,格式yyyy/MM/dd HH:mm",example = "2020/03/24 17:00",required = true)
    @JsonFormat(pattern = "yyyy/MM/dd HH:mm", timezone = "GMT+8" )
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm")
    @NotNull(message = "报名截止时间不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    private Date regEndTime;

    /**
     * 报名费
     */
    @ApiModelProperty(value = "报名费",example = "2000")
    private BigDecimal regFee;
    /**
     * 报名人数
     */
    @ApiModelProperty(value = "报名人数",example = "500",required = true)
    @NotNull(message = "人数名额不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    private Integer regNumber;
    /**
     * 是否收费：0免费，1收费
     */
    @ApiModelProperty(value = "是否收费：0免费，1收费",example = "0",required = true)
    @NotNull(message = "收费模式不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    private Integer isFee;
    /**
     * 关键词
     */
    @ApiModelProperty(value = "关键词",example = "关键词1,关键词2",required = true)
    @NotNull(message = "关键词不能为空",groups = {UserValidator.UpDate.class,UserValidator.InSet.class})
    protected List<String> words= Lists.newArrayList();
    /**
     * 关闭原因
     */
    @ApiModelProperty(value = "关闭原因",example = "活动取消")
    private String close_reason;
    /**
     * 审核态状:0待审核;1已审核;2驳回;4下线
     */
    @ApiModelProperty(value = "审核态状:0待审核;1已审核;2驳回;4下线",example = "0")
    private Integer approvalStatus;
    /**
     * 审批意见(原因)
     */
    @ApiModelProperty(value = "审批意见(原因)",example = "信息错误")
    private String approvalOpinion;
    @ApiModelProperty(value = "审核人员",example = "信息错误")
    private String approvalUser;
    @ApiModelProperty(value = "审核时间",example = "信息错误")
    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    private Date approvalTime;
    /**
     * 创建人id
     */
    @ApiModelProperty(value = "创建人ID",example = "23")
    private Long createId;

}
